﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

[DataContract]
public class Booking
{
    [DataMember]
    public int Id
    {
        get;
        set;
    }

    /// <summary>
    /// Price for the movie
    /// </summary>
    [DataMember]
	public double TotalPrice
	{
		get;
		set;
	}
    /// <summary>
    /// Status for the booking reserved/sold
    /// </summary>
    [DataMember]
	public string Status
	{
		get;
		set;
	}
    /// <summary>
    /// The phonenumber for the booking
    /// </summary>
    [DataMember]
	public string CustomerPhone
	{
		get;
		set;
	}
    /// <summary>
    /// The list of tickets in the booking
    /// </summary>
    [DataMember]
	public List<Ticket> Tickets
	{
		get;
		set;
	}
    /// <summary>
    /// Add ticket
    /// </summary>
    

	public  void AddTicket(Ticket tic)
	{
        Tickets.Add(tic);
	}
    /// <summary>
    /// Delete ticket
    /// </summary>
    
	public void DeleteTicket(Ticket tic)
	{
        Tickets.Remove(tic);
	}
    /// <summary>
    /// The constructor for booking
    /// </summary>
    public Booking (int id, double totalprice, string status, string customerphone, List<Ticket> tickets)
    {
        Id = id;
        TotalPrice = totalprice;
        Status = status;
        CustomerPhone = customerphone;
        Tickets = tickets;
    }
}

